package com.fenghongzhang.day007;

import android.view.View;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;

import java.util.List;

public class MyRVAdapter extends BaseQuickAdapter<VideoBean, BaseViewHolder> {

    int i = 0;
    public MyRVAdapter(int layoutResId, @Nullable List<VideoBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, VideoBean item) {
        StandardGSYVideoPlayer gsyVideoPlayer = helper.getView(R.id.gsy);
        gsyVideoPlayer.setUp(TestVideoUrl.videoUrls[i],false,"美女");
        if(i == 0){
            gsyVideoPlayer.startPlayLogic();
        }
        i++;

    }
}
